/* 
 * File:   RandomGsl.h
 * Author: jcrada
 *
 * Created on August 27, 2008, 3:43 PM
 */

#ifndef _RANDOMGSL_H
#define	_RANDOMGSL_H
#include <gsl/gsl_rng.h>
#include "Random.h"
#include "defs.h"

namespace jcrada {

    class RandomGsl : public Random {
    private:
        static RandomGsl RNG_SEED;
        //rng: Random Number Generator
        const gsl_rng_type * _rng_type;
        gsl_rng * _rng;
        void init();
        DISALLOW_COPY_AND_ASSIGN(RandomGsl);
    public:
        RandomGsl();
        RandomGsl(unsigned int seed);
        virtual ~RandomGsl();
        virtual bool nextBool();
        virtual double nextDouble(double min, double max);
        virtual double nextDouble();
        virtual float nextFloat(float min, float max);
        virtual float nextFloat();
        virtual int nextInt(int min, int max);
        virtual int nextInt();
        virtual long nextLong(long min, long max);
        virtual long nextLong();
        virtual int nextPoisson(double mu);
        virtual int nextPoisson(unsigned int max);
        virtual void setSeed(long seed);
        
        static int main(int argc,char** argv);
    };


}
#endif	/* _RANDOMGSL_H */

